class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.string :name, :null => false
      t.string :email, :null => false
      t.string :crypted_password, :null => false
      t.string :salt, :null => false
      t.decimal :access, :null => false, :options => "CONSTRAINT check_user_rights CHECK VALUE IN(0, 1)"

      t.timestamps
    end
  end

  def self.down
    drop_table :users
  end
end
